package designModel.factory;

//生产汽车的工厂
public class CarFactory implements BaseCarFactory {

    @Override
    public Car create(CarType type, CarColor carColor) {
        Car car = null;
        switch (type) {
            case MPV:
                car = new MPV_car();
                car.Custom(carColor);
                break;
            case SUV:
                car = new SUV_car();
                car.Custom(carColor);
                break;
        }
        return car;
    }
}
